home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 11 / Cream of the Crop 11-1.iso / games / nerak2.zip / HATFIELD.SCR < prev    next >
Text File  |  1994-07-08  |  2KB  |  78 lines

  1. !
  2. !
  3. ! Hatfield Script
  4. !  Karen Scites 1994
  5. !   
  6.  
  7. !------------------------------------------------------------------------!
  8. :@TALK ! Talk to the character !
  9. !------------------------------------------------------------------------!
  10.  
  11.   if player.hp = 0 then
  12.     writeln( player.name, " is dead!" );
  13.     STOP;
  14.   endif;
  15.  
  16.   if npc.picture >= 0 then
  17.     viewpcx(npc);
  18.   endif;
  19.  
  20. ! First, say hello.. !
  21.   if NPC.V0 > 0 then
  22.     writeln( "Howdy ", player.name, ". What brings you back?" );
  23.   else
  24.     writeln( "Howdy." );
  25.   endif;
  26.  
  27. ! Now, set some variables..
  28.   NPC.V0 = 1; ! From know on, remember we've been here
  29.  
  30. :LOOP
  31.   L3 = getstr("Name","Job","Join","Bye");
  32.   if L3 = -1 then 
  33.     writeln( "Ok." );
  34.     goto XSTOP;
  35.   endif;
  36.  
  37. ! First, see if the keyword typed is in the character's text block !
  38.   if dotext( S0 ) then
  39.     if L3 = 3 goto XSTOP;
  40.     goto LOOP;
  41.   endif;
  42.  
  43. ! It didn't, so try the predefined ones..
  44.   on L3 goto CNAME, CJOB, CJOIN, CSTOP;
  45.  
  46. ! Nope, try a 'DEFAULT' line
  47.   if not dotext( "DEFAULT" ) then
  48.     writeln( "I don't know anything about that!" );
  49.   endif;
  50.   goto LOOP;
  51.  
  52. :CNAME
  53.   writeln( "My name is ", NPC.name, "." );
  54.   GOTO LOOP;
  55.  
  56. :CJOB
  57.   writeln( "I am a ", npc.type );
  58.   GOTO LOOP;
  59.  
  60. :CJOIN
  61.   writeln( "I'm too busy.  Sorry." );
  62.   GOTO LOOP;
  63.  
  64. :CSTOP
  65.   writeln( "Please find that pig and clear our names!" );
  66.   goto XSTOP;
  67.  
  68. ! Feel free to expand on this list.. !
  69.  
  70. !-----------------------------------------------------------------!
  71. ! All STOPs now lead here so the screen can be restored if needed !
  72. !-----------------------------------------------------------------!
  73. :XSTOP
  74.   if npc.picture >= 0 then
  75.     paint(window); ! Assumes the picture fits in the window !
  76.   endif;
  77.   STOP;
  78.